use "Professor.dta" , clear
 
 set scheme s1mono, permanent

 
collapse (mean) Competition_better Old_better , by(cntry)
 
 

sort cntry
 
 grstyle init
 grstyle set legend 2,  nobox
 grstyle set size 8pt: tick_label key_label
 grstyle set size 12pt: heading
 grstyle set size 10pt: subheading axis_title
 *grstyle set color Reds, n(5) reverse  gscale(.5) 
 grstyle set intensity 66: bar
 grstyle set graphsize  10cm 14cm 
graph bar  Old_better  Competition_better, over(cntry, label(labsize(medium)) gap(*2))    legend(position(12) row(1)  symxsize(*0.65) size(*1.2) label(1 "Q1: Competition improves HEI") label(2 "Q2: New system is better"))  ylabel(0 0.2 0.4 0.6 0.8 1)   title("{bf:(b) Academics: by Country}", size(vlarge)) subtitle("{bf:Share of stakeholders agreeing with statements Q1 and Q2}", size(medium)) ytitle("Average score", size(medlarge)) yscale(titlegap(*5))  bar(1, lwidth(medthick) lcolor(black) fcolor(white)) bar(2, lwidth(medthick)lcolor(gs12)  fcolor(white)) bargap(-50)
graph export "Figure2b.png", replace 
 
use "Professor.dta" , clear
   
  
collapse (mean) Competition_better Old_better , by(Field)


sort Field
 
 grstyle init
 grstyle set legend 2,  nobox
 grstyle set size 8pt: tick_label key_label
 grstyle set size 12pt: heading
 grstyle set size 10pt: subheading axis_title
* grstyle set color Reds, n(5) reverse  gscale(.5) 
 grstyle set intensity 66: bar
graph bar  Old_better  Competition_better, over(Field, label(angle(45) labsize(medium)) gap(*2))    legend(position(12) row(1)  symxsize(*0.65) size(*1.2) label(1 "Q1: Competition improves HEI") label(2 "Q2: New system is better"))  ylabel(0 0.2 0.4 0.6 0.8 1)   title("{bf:(c) Academics: by field}", size(vlarge))  subtitle("{bf:Share of stakeholders agreeing with statements Q1 and Q2}", size(medium)) ytitle("Average score", size(medlarge)) yscale(titlegap(*5))  bar(1, lwidth(thick) lcolor(black) fcolor(white)) bar(2, lwidth(thick)lcolor(gs12)  fcolor(white)) bargap(-50)
graph export "Figure2c.png", replace  

use "Professor.dta" , clear
  
  
collapse (mean) Competition_better Old_better , by(Grade)

sort Grade
 
 grstyle init
 grstyle set legend 2,  nobox
 grstyle set size 8pt: tick_label key_label
 grstyle set size 12pt: heading
 grstyle set size 10pt: subheading axis_title
 *grstyle set color Reds, n(5) reverse  gscale(.5) 
 grstyle set intensity 66: bar
graph bar  Old_better  Competition_better, over(Grade, label(angle(45) labsize(medium)) gap(*2))    legend(position(12) row(1)  symxsize(*0.65) size(*1.2) label(1 "Q1: Competition improves HEI") label(2 "Q2: New system is better"))  ylabel(0 0.2 0.4 0.6 0.8 1)   title("{bf:(d) Academics: by rank}", size(vlarge)) subtitle("{bf:Share of stakeholders agreeing with statements Q1 and Q2}", size(medium))  ytitle("Average score", size(medlarge)) yscale(titlegap(*5))  bar(1, lwidth(thick) lcolor(black) fcolor(white)) bar(2, lwidth(thick)lcolor(gs12)  fcolor(white)) bargap(-50)
graph export "Figure2d.png", replace 
 
